package com.dlry.db;

import java.util.List;

import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.dlry.entity.DlNotification;

public interface NotificationRepository extends JpaRepository<DlNotification, Long> {

	long count();

	void delete(DlNotification arg0);

	void delete(Iterable<? extends DlNotification> arg0);

	void delete(Long arg0);

	void deleteAll();

	boolean exists(Long arg0);

	DlNotification findOne(Long arg0);

	<S extends DlNotification> S save(S arg0);

	<S extends DlNotification> long count(Example<S> arg0);

	<S extends DlNotification> boolean exists(Example<S> arg0);

	<S extends DlNotification> Page<S> findAll(Example<S> arg0, Pageable arg1);

	<S extends DlNotification> S findOne(Example<S> arg0);

	Page<DlNotification> findAll(Pageable arg0);

	List<DlNotification> findAll();

	List<DlNotification> findAll(Sort sort);

	List<DlNotification> findAll(Iterable<Long> ids);

	<S extends DlNotification> List<S> save(Iterable<S> entities);

	void flush();

	<S extends DlNotification> S saveAndFlush(S entity);

	<S extends DlNotification> List<S> findAll(Example<S> example);

	<S extends DlNotification> List<S> findAll(Example<S> example, Sort sort);

	@Modifying
	@Query("update DlNotification set toped = :toped where id = :id")
	public void setTopedById(@Param("id") long id, @Param("toped") boolean toped);
}
